<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="mall/advert/include::header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5>支付通道编辑</h5>
					</div>
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
							<input type="hidden" id="id" name="id" th:value="${channel.id}">
							<div class="form-group">
								<label class="col-sm-3 control-label">通道名称:</label>
								<div class="col-sm-8">
									<input id="channelName" name="channelName" class="form-control" type="text" th:value="${channel.channelName}">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">通道编号:</label>
								<div class="col-sm-8">
									<input id="channelCode" name="channelCode" class="form-control" type="text" th:value="${channel.channelCode}">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">图标:</label>
								<div class="col-sm-6">
									<input id="icon" name="icon" class="form-control" type="text" onblur="onThumbBlur() " th:value="${channel.icon}">
								</div>
								<div class="col-sm-2">
									<button type="button" onclick="onSelectImgBtnClick('icon','thumbImg')" class="btn btn-primary"><i class="fa fa-check"></i>选择图片</button>
								</div>
							</div>
							<div class="form-group">
								<div class="col-sm-8">
									<label class="col-sm-5 control-label">-</label>
									<img class="img-responsive" id="thumbImg" src="" style="max-width: 30%" th:attr="src=${channel.icon}">
								</div>
							</div>
							<div class="form-group" th:if="${flag} == '0'">
								<label class="col-sm-3 control-label">所属商户:</label>
								<div class="col-sm-2">
									<select data-placeholder="商户" class="form-control chosen-select" name="centerId" id="centerId" tabindex="2">
                                        <option value="">选择商户</option>
                                        <option th:each="item: ${centreList}" th:text="${item.name}" th:value="${item.centreId}" th:selected="${item.centreId}==${centreId}"></option>
									</select>
								</div>
							</div>


							<div class="form-group">
								<label class="col-sm-3 control-label">是否显示:</label>
								<div class="switch onoffswitch col-sm-1">
									<div class="onoffswitch">
										<input type="checkbox"  class="onoffswitch-checkbox" value="1" checked="" id="display" name="display" th:checked="${channel.display} == 1">
										<label class="onoffswitch-label" for="display">
											<span class="onoffswitch-inner"></span>
											<span class="onoffswitch-switch"></span>
										</label>
									</div>
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label">排序:</label>
								<div class="col-sm-8">
									<input id="displayOrder" name="displayOrder" class="form-control" type="number" th:value="${channel.displayOrder}">
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label">备注:</label>
								<div class="col-sm-8">
									<textarea class="form-control" id="remark" name="remark" th:text="${channel.remark}"></textarea>
								</div>
							</div>

							<div class="form-group text-center">
								<div class="col-sm-8 col-sm-offset-2">
									<button type="submit" class="btn btn-primary"><i class="fa fa-check"></i>提交</button>
									<div class="btn btn-danger" onclick="closeDow()"><i class="fa fa-remove"></i> 关闭</div>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div th:include="mall/advert/include::footer"></div>
	<script type="text/javascript" src="/js/appjs/mall/payChannel/edit.js">
	</script>
	<script type="text/javascript">
		function closeDow() {
			var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
			parent.layer.close(index);
		}
	</script>
</body>

</html>
